package edu.hpu.mybatis02.controller;

import edu.hpu.mybatis02.mapper.CategoryMapper;
import edu.hpu.mybatis02.pojo.Category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SelectController {
    //控制层调用数据访问层
    @Autowired
    //从容器中取一个对象，赋值给categoryMapper
    CategoryMapper categoryMapper;

//    @RequestMapping("/insert")
//    public Integer insert(String name){
//        Integer insertRows = categoryMapper.insert(name);
//        return insertRows;
//    }

//    @RequestMapping("/selectById")
//    public Category selectById(Integer id){
//        Category category = categoryMapper.selectById(id);
//        return category;
//    }
}
